<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <textarea  id="input" placeholder="输入要传到app的json数据" cols="100" rows="30"></textarea>
    <button id="btn">调用app的方法</button>
</body>
<script>
    var input = document.getElementById('input')
    var btn = document.getElementById('btn')
    function toApp(params){
<!--        window.test();-->
<!--        window.xesApp.testNoParams()-->
<!--        window.xesApp.testOnePamras('参数1')-->
<!--        window.xesApp.testTwoPamrasSecParams('参数1','参数2')-->
<!--        window.xesApp.testMorePamras('参数1',1,'参数3','参数4','参数5')-->
        var url = 'www.xestest.comwww.xestest.123'
        window.xesApp.changeNavgationBarTitle(url);
        window.xesApp.changeNavgationBarBackgroundColor(0xFF8C00);
        window.xesApp.changeTitleColor(0x4169E1);
        window.xesApp.showNavgationBarRightButton('111111');
<!--        window.xesAppSpeechAssessment.playVoice(url)-->
<!--        window.xesAppSpeechAssessment.pauseVoice(url)-->
<!--        window.xesAppSpeechAssessment.stopVoice(url)-->
<!--        window.xesAppSpeechAssessment.stopTranslateVoice()-->
<!--        window.xesAppSpeechAssessment.reTranslateVoice()-->
<!--        window.wx_xesapp.showAnswerResult_LiveVideo('参数1',1,'参数3','参数4','参数5')-->

<!--            window.webkit.messageHandlers.xesApp.postMessage(url);-->

            
<!--        var obj = {-->
<!--            "source":url,-->
<!--            "sourceType":1,-->
<!--            "isOnline":true,-->
<!--            "voiceName":'哈哈'-->
<!--        }-->
<!--        window.xesAppSpeechAssessment.translateVoice('呼呼',1,true,'哈哈')-->

    }
    btn.onclick=function(){
        var params = input.value
        toApp(params)
    }

    var ocCallJS = function() {
        alert("bbb")
        window.webkit.messageHandlers.xesApp.postMessage('收到oc的回调反馈');
    }

</script>
</html>
